<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="pl.org.waff.*" %>
<jsp:useBean id="sitenavigator" class="pl.org.waff.DefaultNavigator" scope="application" />
<jsp:useBean id="applicationprefix" class="java.lang.String" scope="application" />
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="<%=applicationprefix%>/resources/homestyle.css" />
        <title>Waff demo</title>
        <jsp:include page="components/analytics.jsp"/>
    </head>
    <body>
        <div id="wrapper">
            <div id="header"><jsp:include page="components/header.jsp"/></div>
            <div id="menu"><jsp:include page="components/menu.jsp"/></div>
            <div id="breadcrumb"><jsp:include page="components/breadcrumb.jsp"/></div>
            <div id="main">
                <div id="content">
                     <h1>Access denied</h1>
                    <% User user = (User) request.getSession().getAttribute("waffuser");
                        if (user!=null && user.isLoggedIn()) {%>
                        You have insufficient privileges to access this page.<br/>
                            Your are logged in as <%=user.getName()%><br/>
                            <a href='<%=WaffServlet.getUserManager().createLogoutURL(sitenavigator.getAbsolutePath("/logout"))%>'>Logout</a> and login as a different user.
                        <%} else { %>
                        You are anonymous user.<br/>
                    Please <a href='<%=WaffServlet.getUserManager().createLoginURL(sitenavigator.getAbsolutePath("/login"))%>'>log in</a>
                    <%}
                    %>
                </div>
            </div>
            <div id="footer"><jsp:include page="components/footer.jsp"/></div>
        </div>
    </body>
</html> 
